<?php /* Smarty version Smarty-3.1.14, created on 2017-08-18 16:01:00
         compiled from "E:\phpStudy\WWW\zyshop\admin\templates\users_list.html" */ ?>
<?php /*%%SmartyHeaderCode:309525994f29eae77c5-34097402%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'db7ffdedb7e7484ff486e90f67564c059f24ac5e' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\zyshop\\admin\\templates\\users_list.html',
      1 => 1503043258,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '309525994f29eae77c5-34097402',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_5994f29eb3abf9_57082943',
  'variables' => 
  array (
    'URL' => 0,
    'user_ranks' => 0,
    'sou' => 0,
    'lista' => 0,
    'user' => 0,
    'list' => 0,
    'page' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5994f29eb3abf9_57082943')) {function content_5994f29eb3abf9_57082943($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'E:\\phpStudy\\WWW\\zyshop\\includes\\libs\\plugins\\modifier.date_format.php';
?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['URL']->value;?>
resource/laydate/laydate.js"></script>
<style>
table{text-align: center;}
th{text-align:center; font-weight: bolder;}
th a{ color:#000000;}
.firtd {	width: 100px;	padding-right: 10px;	text-align: right;}
input{width: 90px;}
textarea {	width: 350px;	height: 100px;}
#jin{
color:#f00;
}
#jin1{
color:#0D93BF;
}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>会员列表</h3>
   <form action="users.php" name="searchForm" method="post">
    <input type="hidden" name="act" value="list">
    会员等级
    <select name="user_rank">
      <option value="0">请选择...</option>
      <?php  $_smarty_tpl->tpl_vars['lista'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['lista']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['user_ranks']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['lista']->key => $_smarty_tpl->tpl_vars['lista']->value){
$_smarty_tpl->tpl_vars['lista']->_loop = true;
?>
          <option <?php if ($_smarty_tpl->tpl_vars['sou']->value['user_rank']==$_smarty_tpl->tpl_vars['lista']->value['rank_id']){?> selected="selected" <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['lista']->value['rank_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['lista']->value['rank_name'];?>
</option>
      <?php } ?></select>
    会员名称
    <input type="text" value="<?php if ($_smarty_tpl->tpl_vars['sou']->value['user_name']){?><?php echo $_smarty_tpl->tpl_vars['sou']->value['user_name'];?>
<?php }?>" name="user_name" style=" width:110px;height:18px;" >
    注册开始日期
    <input type="text" name="start_time" id="start_time"  value="<?php if ($_smarty_tpl->tpl_vars['sou']->value['start_time']){?><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['sou']->value['start_time'],'%Y-%m-%d %H:%M:%I');?>
<?php }?>" style=" width:110px;height:18px;">
    注册结束日期
    <input type="text" name="end_time" id="end_time"  value="<?php if ($_smarty_tpl->tpl_vars['sou']->value['end_time']){?><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['sou']->value['start_time'],'%Y-%m-%d %H:%M:%I');?>
<?php }?>" style=" width:110px;height:18px;">
    <input value=" 搜索 " id="but_sousuo" style="width:50px; height:27px; margin-top:13px;" class="button" type="submit">
    <div style="background:rgba(251,112,45,1);width:125px;height:40px;float:right;text-align:center;border-radius:5px;">
      <a href="users.php?act=edit">
        <h5 style="padding:10px;color:#fff;">添加会员</h5>
      </a>
    </div>
    </form>
  </div> 
</div>
<div class="fixed_bottom">
  <form method="post" action="" id="aspnetForm" name="form1">
    <table align="center;" class="table tb-type2">
      <thead>
        <tr>
          <th width="50"><a>编号</a></th>
          <th width="25%"><a>用户名称</a></th>
          <th><a>会员等级</a></th>
          <th><a>昵称</a></th>
          <th><a>性别</a></th>
          <th><a>邮箱</a></th>
          <th><a>注册日期</a></th>
          <th><a>操作</a></th>
        </tr>
      </thead>
      <tbody id="sortable">
        <?php  $_smarty_tpl->tpl_vars['list'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['list']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['user']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['list']->key => $_smarty_tpl->tpl_vars['list']->value){
$_smarty_tpl->tpl_vars['list']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['list']->key;
?>
            <tr>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['user_id'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['user_name'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['rank_name'];?>
</td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['alias'];?>
</td>
              <td><?php if ($_smarty_tpl->tpl_vars['list']->value['sex']==1){?>男<?php }else{ ?>女<?php }?></td>
              <td><?php echo $_smarty_tpl->tpl_vars['list']->value['email'];?>
</td>
              <td><span><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['list']->value['reg_time'],'%Y-%m-%d %H:%M:%I');?>
</span></td>      
              <td>
                <a href="users.php?act=edit&user_id=<?php echo $_smarty_tpl->tpl_vars['list']->value['user_id'];?>
">编辑</a>
                <?php if ($_smarty_tpl->tpl_vars['list']->value['disable']==0){?>
                	<a href="javascript:;" id="jin" onclick="jy(this,<?php echo $_smarty_tpl->tpl_vars['list']->value['user_id'];?>
)">禁用</a>
                <?php }else{ ?>
                	<a href="javascript:;" id="jin1" onclick="jy(this,<?php echo $_smarty_tpl->tpl_vars['list']->value['user_id'];?>
)">开启</a>
                <?php }?>
              </td>
            </tr>
        <?php } ?>
    </table>
   <div class="page"><?php echo $_smarty_tpl->tpl_vars['page']->value;?>
</div>
  </form>
</div>
</body>
<script>
//选择时间
laydate({
  elem: '#start_time', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
  event: 'focus', //响应事件。如果没有传入event，则按照默认的click
  format: 'YYYY-MM-DD hh:mm:ss', //日期格式
  istime: true, //是否开启时间选择
  isclear: true, //是否显示清空
  istoday: true, //是否显示今天
  issure: true, //是否显示确认
  festival: true, //是否显示节日
  min: '1900-01-01 00:00:00', //最小日期
  max: '2099-12-31 23:59:59', //最大日期
  fixed: true, //是否固定在可视区域
});
laydate({
  elem: '#end_time', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
  event: 'focus', //响应事件。如果没有传入event，则按照默认的click
  format: 'YYYY-MM-DD hh:mm:ss', //日期格式
  istime: true, //是否开启时间选择
  isclear: true, //是否显示清空
  istoday: true, //是否显示今天
  issure: true, //是否显示确认
  festival: true, //是否显示节日
  min: '1900-01-01 00:00:00', //最小日期
  max: '2099-12-31 23:59:59', //最大日期
  fixed: true, //是否固定在可视区域
});
function jy(obj,user_id){
	if($(obj).html()=='禁用'){
		var vals=1;
	}else{
		var vals=2;
	}
	$.post("users.php",{act:'disable',id:user_id,val:vals},function(data){
		if(data==1){
			layer.msg("操作成功！");
			if(vals==1){$(obj).html("开启");$(obj).css("color","#0D93BF");}else{$(obj).html("禁用");$(obj).css("color","#f00")}
		}else if(data==2){
			layer.msg("操作失败！");
		}
	})
}
</script>
</html><?php }} ?>